package com.ruoyi.xh.service.impl;

import java.util.stream.Collectors;
import java.util.stream.Stream;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.transaction.annotation.Transactional;
import com.ruoyi.xh.mapper.XhSystemMenuMapper;
import com.ruoyi.xh.domain.XhSystemMenu;
import com.ruoyi.xh.service.IXhSystemMenuService;

/**
 * 系统-菜单Service业务层处理
 * 
 * @author songjw
 * @date 2024-12-13
 */
@Service
public class XhSystemMenuServiceImpl extends ServiceImpl<XhSystemMenuMapper,XhSystemMenu> implements IXhSystemMenuService {

    /**
     * 查询系统-菜单
     * 
     * @param id 系统-菜单主键
     * @return 系统-菜单
     */
    @Override
    public XhSystemMenu selectXhSystemMenuById(String id)
    {
        return this.getById(id);
    }

    /**
     * 查询系统-菜单列表
     * 
     * @param xhSystemMenu 系统-菜单
     * @return 系统-菜单
     */
    @Override
    public Page<XhSystemMenu> selectXhSystemMenuList(XhSystemMenu xhSystemMenu)
    {
        return new Page<>();
    }

    /**
     * 新增系统-菜单
     * 
     * @param xhSystemMenu 系统-菜单
     *
     */
    @Override
    public void insertXhSystemMenu(XhSystemMenu xhSystemMenu)
    {
        this.save(xhSystemMenu);
    }

    /**
     * 修改系统-菜单
     * 
     * @param xhSystemMenu 系统-菜单
     *
     */
    @Override
    public void updateXhSystemMenu(XhSystemMenu xhSystemMenu)
    {
        this.updateById(xhSystemMenu);
    }

    /**
     * 批量删除系统-菜单
     * 
     * @param ids 需要删除的系统-菜单主键
     *
     */
    @Override
    @Transactional(rollbackFor = Exception.class)
    public void deleteXhSystemMenuByIds(String[] ids)
    {
        this.removeByIds(Stream.of(ids).collect(Collectors.toSet()));
    }
}
